// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from '@/App'
import router from '@/router'
import store from '@/store'
import '@/permission'
import 'babel-polyfill'
import 'es6-promise/auto'
import 'normalize.css/normalize.css' // A modern alternative to CSS resets
// 引入Element-UI
import ElementUI from 'element-ui'
import ElTreeSelect from '@/components/elTreeSelect'
import ElTreeSider from '@/components/elTreeSider'
import QueryTerms from '@/components/searchHeader'
import Tables from '@/components/tables'
import Forms from '@/components/form'
// 引入公共css文件
import '@/configure/index.less'
import '@/assets/css/vc/iconfont/iconfont.css'
// 引入公共js文件
import '@/utils/placeholder'
import '@/utils/date'
import '@/utils/permission'
import '@/utils/prototype'
import '@/components/icons'

import api from '@/api/api'
import global_ from '@/assets/js/global'
import encrypt_ from '@/utils/encryptTool'
import ModifyPwd from '@/configure/features/modify-pwd/index'
Vue.use(ElementUI)
Vue.component('ElTreeSelect', ElTreeSelect)
Vue.component('ElTreeSider', ElTreeSider)
Vue.component('QueryTerms', QueryTerms)
Vue.component('Tables', Tables)
Vue.component('Forms', Forms)
Vue.prototype.$api = api
Vue.prototype.GLOBAL = global_
Vue.prototype.ENCRYPT = encrypt_
Vue.prototype.$bus = new Vue()
Vue.use(ModifyPwd)

Vue.config.productionTip = false

/* eslint-disable no-new */
let vm = new Vue({
  el: '#app',
  router,
  store,
  components: {
    App
  },
  template: '<App/>'
})

export default vm
